<template>
<div>
  <h2>商品列表</h2>
  <ul>
    <li :key="item.name" v-for="item of list">
      <nuxt-link :to="'/detail/'+item.id">{{item.name}}</nuxt-link>
    </li>
  </ul>
</div>
</template>

<script>
    export default {
      asyncDate({app}){
        const arr = app.sort([1,7,6,5,10]);
        console.log(arr);
        const arr2 = app.$integerSort([1,7,6,5,10]);
        console.log(arr2);
      },
      mounted() {
        const arr3 = this.$integerSort([1,7,6,5,10]);
        console.log(arr3);
      },
      data:()=>{
        return {
          list:[
            {
              id:'001',
              name:'iphone',
              price:10000
            },
            {
              id:'002',
              name:'OPPO',
              price:5000
            },
            {
              id:'003',
              name:'VIVO',
              price:4000
            }
          ]
        }
      }
    }
</script>

<style scoped>

</style>
